﻿
using System;
using OnlineCourse.Model.Entity;
using System.Collections.Generic;
using System.Text;


namespace OnlineCourse.Services.IServices
{
    public interface IUserService
    {
        /// <summary>
        /// ID获取单个用户信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns</returns>
        User GetById(Guid id);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="name"></param>
        /// <param name="pwd"></param>
        /// <returns></returns>
        User GetByLogin(string name, string pwd);
        /// <summary>
        /// 查询用户列表
        /// </summary>
        /// <param name="page">当前页</param>
        /// <param name="pageSize">每页记录数</param>
        /// <returns></returns>
       IList<User> GetList(out int total, int page = 1, int pageSize = 10);
        /// <summary>
        /// 添加用户
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        bool Add(string Name,string pwd,string Sex,int Age);
        /// <summary>
        /// 删除用户
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        bool Delete(Guid id);
        /// <summary>
        /// 更新用户
        /// </summary>
        /// <param name="id"></param>   
        /// <param name="model"></param>
        /// <returns></returns>
        bool Update(Guid id, User model);
    }
}
